<?php

namespace Controle\ControleBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * MotCle
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Controle\ControleBundle\Entity\MotCleRepository")
 */
class MotCle
{
    
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="libelle", type="string", length=255)
     */
    private $libelle;
    /**
     *
     * @ORM\ManyToMany(targetEntity="Theme",mappedBy="motCles")
     */
    private  $themes;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set libelle
     *
     * @param string $libelle
     * @return MotCle
     */
    public function setLibelle($libelle)
    {
        $this->libelle = $libelle;
    
        return $this;
    }

    /**
     * Get libelle
     *
     * @return string 
     */
    public function getLibelle()
    {
        return $this->libelle;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->themes = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Add themes
     *
     * @param \Controle\ControleBundle\Entity\Theme $themes
     * @return MotCle
     */
    public function addTheme(\Controle\ControleBundle\Entity\Theme $themes)
    {
        $this->themes[] = $themes;
    
        return $this;
    }

    /**
     * Remove themes
     *
     * @param \Controle\ControleBundle\Entity\Theme $themes
     */
    public function removeTheme(\Controle\ControleBundle\Entity\Theme $themes)
    {
        $this->themes->removeElement($themes);
    }

    /**
     * Get themes
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getThemes()
    {
        return $this->themes;
    }
}